# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=gwcheck
pkgver=0.1
pkgrel=2
groups=('blackarch' 'blackarch-networking' 'blackarch-scanner')
pkgdesc='A simple program that checks if a host in an ethernet network is a gateway to Internet.'
arch=('x86_64' 'aarch64')
url='http://packetstormsecurity.com/files/62047/gwcheck.c.html'
license=('GPL2')
depends=('libpcap')
source=('https://dl.packetstormsecurity.net/UNIX/scanners/gwcheck.c')
sha512sums=('16b9f507385cd9d15000b31c7abb3677ab56b7e787d013eca32f1adab83a34659d4f7b58c05cd29bd6a774fa55c3f878de5b7da2fef926725c89afb64adc2412')

build() {
  gcc -O2 "$pkgname.c" -o $pkgname -lpcap
}

package() {
  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
}

